// components/horizontalHouseItem/horizontalHouseItem.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    isLast: {
      type: Boolean,
      value: false
    },
    data: {
      type: Object,
      value: {}
    },
    index: {
      type: Number,
      value: 0
    },
    type: {
      type: String,
      value: ""
    },
    //价格显示类型:默认显示住宅价格哈
    priceType: {
      type: String,
      value: "house",
    },

  },

  /**
   * 组件的初始数据
   */
  data: {
    tempHouseTags: [
      {
        title: "低单价",
        status: 1
      },
      {
        title: "地铁房",
        status: 0
      },
      {
        title: "两室一厅",
        status: 0
      },
      {
        title: "满五唯一",
        status: 0
      },
    ],
    isLoadImg: false,
  },

  /**
   * 组件的方法列表
   */
  methods: {
    //去到房源详情
    pushToDetail() {
      let houseNumber = this.properties.data.houseNumber;
      wx.navigateTo({
        url: '/newHousePackage/pages/newHouseDetail/newHouseDetail?houseNumber=' + houseNumber + "&priceType=" + this.properties.priceType,
      })
    },
    //关注:
    collectNewCerHouse() {
      this.triggerEvent('collectAction', { data: this.properties.data, index: this.properties.index, type: this.properties.type })
    },
    imgBindLoadAction() {
      this.setData({
        isLoadImg: true
      })
    },
  }
})
